﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache" content="no-cache" />
    <title>路径执行编辑</title>
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/ligerui-icons.css" />
    <link rel="stylesheet" href="~/Scripts/ligerUI/skins/Gray/css/all.css" />
    <link rel="stylesheet" href="~/Content/css/common.css" />
    <script src="~/Scripts/jquery-1.10.2.min.js"  ></script>
    <script src="~/Scripts/ligerUI/js/ligerui.all.js"></script>
    <script src="~/Scripts/common.js?v=@DateTime.Now.ToString("yyyyMMdd")"></script>
    <style>
        .gridtable {
            width: 400px;
            margin: 0px;
        }

            .gridtable td {
                height: 30px;
                line-height: 30px;
            }

        .radio_label {
            display: inline-block;
            width: auto;
            height: 22px;
            background: url(/Content/images/radiobutton.png) no-repeat;
            background-position: -13px -16px;
            text-indent: 22px;
            line-height: 22px;
        }

            .radio_label:hover {
                background-position: -13px -116px;
            }

        .checkbox_label {
            display: inline-block;
            width: auto;
            height: 22px;
            background: url(/Content/images/checkboxbutton.png) no-repeat;
            background-position: -13px -16px;
            text-indent: 22px;
            line-height: 22px;
        }

            .checkbox_label:hover {
                background-position: -13px -116px;
            }

        .checked {
            background-position: -13px -216px;
        }

            .checked:hover {
                background-position: -13px -216px;
            }

        input[type=radio] {
            width: 0;
        }

        input[type=checkbox] {
            width: 0;
        }
    </style>
</head>
<body>
    <div style="margin:10px 0px;">
        <table class="gridtable">
            <tr>
                <td style="text-align:right; width:100px;">
                    质控编码：
                </td>
                <td>
                    <input type="text" id="txtPathWayCode" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
           
                <td style="text-align:right; width:100px;">
                    质控点：
                </td>
                <td>
                    <input type="text" id="txtPathWayName" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
           
            <tr>
                <td style="text-align:right; width:100px;">
                    质控类别：
                </td>
                <td>
                    <input type="text" id="txtOpname" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    对比项：
                </td>
                <td>
                    <input type="text" id="txtOptime" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    时长(分)：
                </td>
                <td>
                    <input type="text" id="txtOptime" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    漏项提醒：
                </td>
                <td>
                    <label><input type="radio" id="rdoIsWarring1" name="rdoIsWarring" checked="checked" />是</label>
                    <label><input type="radio" id="rdoIsWarring2" name="rdoIsWarring" />否</label>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    危急值范围(低)：
                </td>
                <td>
                    <input type="text" id="txtOptime" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    危急值范围(高)：
                </td>
                <td>
                    <input type="text" id="txtOptime" class="l-text" style="width:250px;" value="" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    启用
                </td>
                <td>
                    <label><input type="checkbox" id="chkEnabled" name="chkEnabled" />&nbsp;</label>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center;padding-top:10px;">
                    <input id="btnSubmit" type="button" value="确定" class="l-button" onclick="save()" />&nbsp;&nbsp;&nbsp;
                    <input id="btnReset" type="reset" value="重置" class="l-button" />
                </td>
            </tr>
            <tr></tr>
        </table>
        <input type="hidden" id="hdnId" value="" />
    </div>
    <script  >
        function save() {
            if ($("#txtPathWayName").val() == "")
            { $("#txtPathWayName").focus(); return; }
            var editurl = "../PathwayList/EditSubmit";
            $.post(editurl, {
                rnd: new Date().getMilliseconds(),
                pathwayName: $("#txtPathWayName").val(),
                Id: $("#hdnId").val()
            }, function (data, textStatus) {
                if (textStatus == "success") {
                    var d = $.parseJSON(data);
                    if (d.Result == 1) {
                        $.ligerDialog.success("保存成功", function () {
                            parent.window.btnSearch.click();
                            frameElement.dialog.close();
                        })
                    }
                    else if (d.Result == 0) {
                        $.ligerDialog.error(d.Body);
                    }
                    else {
                        $.ligerDialog.error("程序错误");
                    }
                } else { $.ligerDialog.error("程序错误"); }
            })
        }
        $(function () {
            //追加样式
            $("input[type=radio]").parent().addClass("radio_label");
            if (navigator.userAgent.indexOf("Firefox") > 0) { $(":radio,:checkbox").hide(); }
            $("input[type=radio][disabled!=disabled]").click(function () {
                $("input[type=radio][name='" + $(this).attr('name') + "']").parent().removeClass("checked")
                $(this).parent().addClass("checked");
            });
            $("input[type=radio][checked=checked]").parent().addClass("checked");
            $("input[type=checkbox]").parent().addClass("checkbox_label");
            $("input[type=checkbox][disabled!=disabled]").click(function (e) {
                if ($(this).parent().hasClass("checked"))
                    $(this).parent().removeClass("checked");
                else
                    $(this).parent().addClass("checked");
            });
            $("input[type=checkbox][checked=checked]").parent().addClass("checked");
        })
    </script>
</body>
</html>

